/*
 * This was modified from Tab Browser Preferences by Bradley Chapman
 *
 * it contains specific code for the search bar dialog
 *
 */
function TMP_onLoad()
{
   eval("onAfterLoad ="+onAfterLoad.toString().replace(
   'var tabChecked = false;',
   'gDialog.newtabFocus = document.getElementById("searchTabFocus");\
    var tabChecked = false, focusChecked = false;'
   ).replace(
   'tabChecked = pref.getBoolPref(kTabPref);',
   'tabChecked = pref.getBoolPref("extensions.tabmix.opentabfor.search");\
    focusChecked = pref.getBoolPref("extensions.tabmix.loadSearchInBackground");'
   ).replace(
   'gDialog.newtab.setAttribute("checked", tabChecked);',
   'gDialog.newtab.setAttribute("checked", tabChecked);\
    gDialog.newtabFocus.setAttribute("checked", focusChecked);\
    gDialog.newtabFocus.setAttribute("disabled", !gDialog.newtab.checked);'
   ));

   eval("setPrefs ="+setPrefs.toString().replace(
   'pref.setBoolPref(kTabPref, gDialog.newtab.checked);',
   'pref.setBoolPref("extensions.tabmix.opentabfor.search", gDialog.newtab.checked); \
    pref.setBoolPref("extensions.tabmix.loadSearchInBackground", gDialog.newtabFocus.checked);'
   ));

   onLoad();
   return true;
}